package main

import (
	"fmt"
	"net"
	"os"
)

func main() {
	addr, err := net.ResolveTCPAddr("tcp4", ":6060")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
	lisener, err := net.ListenTCP("tcp", addr)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(2)
	}
	for {
		conn, err := lisener.Accept()
		if err != nil {
			continue
		}
		conn.Write([]byte("hello world"))
	}
}
